<?php

namespace App\Models\admin;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * 应用权限管理
 *
 * @Description:
 *
 * @Author: zhx
 *
 * @Date: 2023-09-06
 *
 * @LastEditTime: 2023-09-06
 */
class ApplicationAuth extends Model
{
    use HasFactory;

    protected $table = 'admin_application_auth';

    public $fillable = ['app_id', 'name', 'slug', 'icon', 'http_path', 'order', 'parent_id', 'type', 'status'];

    /**
     * 为 array / JSON 序列化准备日期格式
     */
    protected function serializeDate(DateTimeInterface $date): string
    {
        return $date->format('Y-m-d H:i:s');
    }
}
